package org.lee.status.app;

import lombok.Data;
import org.lee.status.app.constants.GConstants;

/**
 * Result
 * 结果
 *
 * @author dralee
 * @date 2021-11-24 09:43:01
 **/
@Data
public class Result {

    private int code;
    private String message;

    private Result() {
    }

    private Result(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public static Result success(String message) {
        return new Result(GConstants.CODE_SUCCESS, message);
    }

    public static Result failure(String message) {
        return new Result(GConstants.CODE_FAILURE, message);
    }
}
